/*******************************************************************************
 * Copyright (c) 2008 Jakub Kornas.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the GNU Lesser Public License v2.1
 * which accompanies this distribution, and is available at
 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * 
 * Contributors:
 *     Jakub Kornas - initial API and implementation
 *     Sylvain Sicard - integration in FracLite Runtime
 ******************************************************************************/

package org.objectweb.fractal.deployment.local.api;

import org.objectweb.fractal.api.Component;

/**
 * A {@link IGarbageCollector} cleans up the unused
 * {@link ModuleComponent}s. A module component can only be garbage collected if
 * nobody depends on it and it is not marked.
 * 
 * @author <a href="mailto:jakub.kornas@inrialpes.fr">Jakub Kornas
 */
public interface IGarbageCollector {

	/**
	 * Notifies this {@link IGarbageCollector} that a {@link Component}
	 * 
	 * @param comp
	 *            A freshly created {@link Component}
	 */
	public void notifyComponentCreated(Component comp);

	/**
	 * Notifies this {@link IGarbageCollector} that a give {@link Component} was
	 * destroyed (is no longer present in the application)
	 * 
	 * @param comp
	 *            A {@link Component} that was destroyed
	 */
	public void notifyComponentDestroyed(Component comp);

}
